#include <stdio.h>

int missingNumber(int* nums, int numsSize)
{
    for(int i = 0;i < numsSize;i++)
    {
        for(int j = 0;i < numsSize;j++)
        {
            if(i == nums[j])
                break;
            else
                return i;
        }
    }
}

int main()
{
    int nums[] = {4,2,1,3};
    int numsSize = sizeof(nums)/sizeof(nums[0]);
    int n = missingNumber(nums,numsSize);
    printf("%d\n",n);
    return 0;
}